package GUI;

import java.io.IOException;

import DataStorageAccess.XMLtoData;

import ProgramLogic.*;
import ProgramLogicAccess.ProgramLogicAccess;

public class Start {
    public static void main(String[] args) throws IOException {
	MediaManager.setInstance(XMLtoData.load());
	MediaManager mediaManager = MediaManager.getInstance();
	ProgramLogicAccess prgAccess = new ProgramLogicAccess();
	Medium[] medien = prgAccess.getAllMedia();

	for (int i = 0; i < medien.length; i++) {
	    System.out.println("item " + medien[i]);
	}
	
	mediaManager.addMedium(new Buch("hu","oa"));
	prgAccess.save();
	new GUI();

    }
}
